package com.acme.chat.util;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

public final class Utils {
    private Utils() {

    }

    /**
     * Method returns current date string in format "HH:mm:ss".
     *
     * @return
     */
    public static String getCurrentTimeFormatted() {
        final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
        return dateFormat.format(new Date());
    }

    /**
     * Method returns current time timestamp.
     *
     * @return
     */
    public static Timestamp getCurrentTimestamp() {
        return new java.sql.Timestamp(new Date().getTime());
    }
}
